This section describes functions that can be implemented by sequence grabber channel components.
pascal ComponentResult SGAddExtendedFrameReference(SeqGrabComponent s,
SeqGrabExtendedFrameInfoPtr frameInfo);
The SGAddExtendedMovieData function allows your channel component to add data to a movie without writing data to a movie file.
pascal ComponentResult SGAddExtendedMovieData(SeqGrabComponent s, SGChannel c, Ptr p,
long len, wide *offset, long chRefCon, TimeValue time, short writeType, SGOutput
*whichOutput);
SGAddExtendedMovieData differs from SGAddMovieData in two respects: the offset parameter allows a 64-bit value, and the whichOutput parameter does not exist in SGAddMovieData .
The use of whichOutput depends on the value passed in the writeType parameter. If the writeType is seqGrabWriteAppend or seqGrabWriteReserve , the whichOutput parameter is a return value specifying the sequence grabber output to which data was written or in which space was reserved. If the writeType is seqGrabWriteFill , the whichOutput parameter is an input value indicating which sequence grabber output the data should be written to.
The SGAddOutputDataRefToMedia function lets you manage capture sessions that involve multiple data references. You pass to SGAddOutputDataRefToMedia a sequence grabber output along with a media and sample description, and SGAddOutputDataRefToMedia adds the data reference to the data reference list of the specified media. SGAddOutputDataRefToMedia also updates the data reference index field of the sample description to refer to the data reference.
pascal ComponentResult SGAddOutputDataRefToMedia(SeqGrabComponent s, SGOutput sgOut,
Media theMedia, SampleDescriptionHandle desc);
The SGChannelGetDataSourceName function returns the data source name for a track.
pascal ComponentResult SGChannelGetDataSourceName (
SGChannel c,
Str255 name,
ScriptCode *scriptTag);
The SGChannelGetDataSourceName function allows you to get the source information specified with SGChannelSetDataSourceName .
The SGChannelGetRequestedDataRate function returns the current maximum data rate requested for a channel.
pascal ComponentResult SGChannelGetRequestedDataRate (
SGChannel c,
long *bytesPerSecond);
The SGChannelSetDataSourceName function sets the data source name for a track.
pascal ComponentResult SGChannelSetDataSourceName (
SGChannel c,
ConstStr255Param name,
ScriptCode scriptTag);
The SGChannelSetDataSourceName function allows you to set the source information for a sequence grabber channel. You must set this information before you start digitizing.
This source information identifies the source of the video data (say, a videotape name). The sequence grabber channel stores this information in a timecode track in the movie created after the capture is complete. If the video digitizer does not provide timecode information, the sequence grabber does not save this information.
This function is currently supported only by video channels.
The SGChannelSetRequestedDataRate function specifies the maximum requested data rate for a channel.
pascal ComponentResult SGChannelSetRequestedDataRate (
SGChannel c,
long bytesPerSecond);
The SGChannelSetRequestedDataRate function allows the sequence grabber component to specify the maximum rate at which it would like to receive data from your channel component.
The data rate supplied by the sequence grabber component represents a requested data rate. Your component may not be able to observe that rate under all conditions.
The SGGetAdditionalSoundRates function returns the additional sound sample rates added to the specified sequence grabber sound channel.
pascal ComponentResult SGGetAdditionalSoundRates(SGChannel c,
Handle *rates);
SGGetAdditionalSoundRates returns a copy of the list of additional samples rates passed to the SSGetAdditionalSoundRates previously. If no additional sample rates have been set, SGGetAdditionalSoundRates sets the rates handle to nil . The caller of this routine is responsible for disposing of the returned rates handle.
The SGGetNextExtendedFrameReference function allows a channel component to retrieve the sample references stored previously by SGAddExtendedMovieData or SGAddExtendedFrameReference .
pascal ComponentResult SGGetNextExtendedFrameReference(SeqGrabComponent s,
SeqGrabExtendedFrameInfoPtr frameInfo, TimeValue *frameDuration, long
*frameNumber);
SGGetNextExtendedFrameReference differs from SGGetNextFrameReference in that it fills out a SeqGrabExtendedFrameInfo structure instead of a SeqGrabFrameInfo structure.
Your channel component can process frame references sequentially or randomly. You can specify any relative frame for which you want to retrieve information.
The SGGetPreferredPacketSize function returns the preferred packet size for the sequence grabber component.
pascal ComponentResult SGGetPreferredPacketSize (
SGChannel c,
long *preferredPacketSizeInBytes);
The SGGetUserVideoCompressorList function returns the video compression formats to be displayed by the specified sequence grabber video channel.
pascal ComponentResult SGGetUserVideoCompressorList(SGChannel c,
Handle *compressorTypes);
SGGetUserVideoCompressorList returns a copy of the list of video compression formats passed to the SGSetUserVideoCompressorList previously. If no video compression formats have been set, SGGetUserVideoCompressorList sets the compressorTypes handle to nil . The caller of this routine is responsible for disposing of the returned video compression formats handle.
The SGSetAdditionalSoundRates function allows an application to specify a list of sound sample rates to be included in the sequence grabber's sound settings dialog box. If any of the requested rates are not supported directly by the available sound capture hardware, sound will be captured at one of the available hardware rates and then rate converted in software to the requested rate.
pascal ComponentResult SGSetAdditionalSoundRates(SGChannel c,
Handle rates)
The SGSetPreferredPacketSize function sets the preferred packet size for the sequence grabber channel component.
pascal ComponentResult SGSetPreferredPacketSize (
SGChannel c,
long preferredPacketSizeInBytes);
The SGSetUserVideoCompressorList function allows an application to specify the list of video compression formats to be included in the sequence grabber's video settings dialog box. This allows an application to limit the number of video compression formats that will be displayed to the user. For applications using the sequence grabber for a very specific purpose, this allows inappropriate compression choices to be filtered out.
pascal ComponentResult SGSetUserVideoCompressorList(SGChannel c,
Handle compressorTypes);
The SGWriteExtendedMovieData function allows your channel component to add data to a movie.
pascal ComponentResult SGWriteExtendedMovieData(SeqGrabComponent s, SGChannel c, Ptr p,
long len, wide *offset, SGOutput *sgOut);